<?php

namespace App\Containers\AppSection\Confirmation\Mails;

use App\Ship\Parents\Mails\Mail;
use Illuminate\Bus\Queueable;

class SendCodeMail extends Mail
{
    use Queueable;

    protected string $code;
    protected string $email;

    /**
     * SendCodeMail constructor.
     *
     * @param string $code
     * @param string $email
     */
    public function __construct(string $code, string $email)
    {
        $this->email = $email;
        $this->code = $code;
        //
    }

    public function build(): SendCodeMail
    {
        return $this->view('appSection@confirmation::register-code')
            ->to($this->email)
            ->with([
                'code' => $this->code
            ]);
    }
}
